import 'package:flutter/material.dart';
import 'package:myflutter/television/signal.dart';

class PageShower extends StatefulWidget {
    PageShower({super.key});
  _PageShowerState _pageShowerState = _PageShowerState();

  void signalRead(var signal) {
    switch (signal) {
      case Signal.center:
        _pageShowerState.centerClick();
        break;
      case Signal.left:
        _pageShowerState.leftClick();
        break;
      case Signal.up:
        _pageShowerState.upClick();
        break;
      case Signal.right:
        _pageShowerState.rightClick();
        break;
      case Signal.down:
        _pageShowerState.downClick();
    }
  }



  @override
  State<StatefulWidget> createState() {
    return _pageShowerState;
  }

}

class _PageShowerState extends State<PageShower> {
  void centerClick() {
    setState(() {

    });
  }

  void leftClick() {
    setState(() {

    });
  }
  void upClick() {
    setState(() {

    });
  }
  void rightClick() {
    setState(() {

    });
  }
  void downClick() {
    setState(() {

    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("我的电视主页"),
        ),
        body: null,
      ),
      routes: {

      },//路由映射
    );
  }

}